package com.keepmoving.service.impl;

import com.keepmoving.dao.ClubDao;
import com.keepmoving.po.Club;
import com.keepmoving.service.ClubService;
import com.keepmoving.vo.CourseInfo;
import com.keepmoving.vo.OrderInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ClubServiceImpl implements ClubService {
    @Resource
    ClubDao clubDao;
    @Override
    public List<Club> findAll() {
        return clubDao.findAll();
    }

    @Override
    public OrderInfo findByClId(int clId) {
        return clubDao.findByClId(clId);
    }

    @Override
    public boolean insert(Club club) {
        return clubDao.insert(club)>0?true:false;
    }

    @Override
    public boolean update(Club club) {
        return clubDao.update(club)>0?true:false;
    }

    @Override
    public boolean delete(int[] arrays) {
        return clubDao.delete(arrays)>0?true:false;
    }

    @Override
    public List<CourseInfo> findByClid(int clId) {
        return clubDao.findByClid(clId);
    }

    @Override
    public List<Club> findBySort(String sort) {
        return clubDao.findBySort(sort);
    }
}
